package com.kgcx.organization.domain;

import com.kgcx.common.annotation.dict.Dict;
import com.kgcx.dbutils.annotation.SelectLike;
import com.kgcx.dbutils.domain.BaseDomain;
import com.kgcx.dbutils.utils.AutoCityFilter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Table;
import javax.persistence.Transient;
import java.sql.Timestamp;

@Data
@EqualsAndHashCode(callSuper = false)
@Table(name = "t_organization_auto")
@ApiModel(value = "车辆")
public class Auto extends BaseDomain implements AutoCityFilter{
    /**
     * 车牌号码
     */
    @ApiModelProperty(value = "车牌号码", required = true, example = "湘A88888")
    @SelectLike
    private String autoNo;

    /**
     * 来源，1=自营，2=加盟，字典：autoSource
     */
    @ApiModelProperty(value = "来源，1=自营，2=加盟，字典：autoSource", required = true, example = "1")
    private Integer source;


    /**
     * 车辆归属地城市id
     */
    @ApiModelProperty(value = "车辆归属地城市id", required = true, example = "4301")
    private Long cityId;

    /**
     * 供应商id
     */
    @ApiModelProperty(value = "供应商id", required = true, example = "1")
    private Long supplierId;

    /**
     * 用车类型,字典:vehiclePurpose
     */
    @ApiModelProperty(value = "用车类型,字典:vehiclePurpose", required = true, example = "1")
    private Integer vehiclePurpose;

    /**
     * 品牌id
     */
    @ApiModelProperty(value = "品牌id", required = true, example = "1")
    private Long autoBrandId;

    /**
     * 型号id
     */
    @ApiModelProperty(value = "型号id", required = true, example = "1")
    private Long autoModelId;
    /**
     * 车身颜色，字典:vehicleColor
     */
    @ApiModelProperty(value = "车身颜色，字典:vehicleColor", required = true, example = "1")
    private String vehicleColor;


    /**
     * 车牌颜色，字典：plateColor
     */
    @ApiModelProperty(value = "车牌颜色，字典：plateColor", required = true, example = "1")
    private String plateColor;

    /**
     * 座位数
     */
    @ApiModelProperty(value = "座位数", required = true, example = "5")
    private Integer seats;

    /**
     * 车辆类型，字典：vehicleType
     */
    @ApiModelProperty(value = "车辆类型，字典：vehicleType", required = true, example = "1")
    private String type;

    /**
     * 车辆照片id
     */
    @ApiModelProperty(value = "车辆照片", required = true, example = "649c38917ae84d5a9ab0ec97a4649328")
    private String photoImg;

    /**
     * 车主
     */
    @ApiModelProperty(value = "车主", required = true, example = "宋小宝")
    @SelectLike
    private String ownerName;

    /**
     * 发动机号码
     */
    @ApiModelProperty(value = "发动机号码", required = true, example = "TYR6554781")
    private String engineId;

    /**
     * VIN号码
     */
    @ApiModelProperty(value = "VIN号码", required = true, example = "1872361389712938721")
    private String vin;

    /**
     * 注册日期
     */
    @ApiModelProperty(value = "注册日期", required = true, example = "1511248354000")
    private Timestamp certifyDateA;

    /**
     * 燃料类型
     */
    @ApiModelProperty(value = "燃料类型，字典：FuelType", required = true, example = "A")
    private String fuelType;

    /**
     * 排量
     */
    @ApiModelProperty(value = "排量", required = true, example = "2.0L")
    private String engineDisplace;

    /**
     * 运输证字号
     */
    @ApiModelProperty(value = "运输证字号", required = true, example = "1234567")
    private String certificate;

    /**
     * 运输证发证机构
     */
    @ApiModelProperty(value = "运输证发证机构", required = true, example = "长沙市交通局")
    private String transAgency;

    /**
     * 运输证经营地区
     */
    @ApiModelProperty(value = "运输证经营地区", required = true, example = "长沙市")
    private String transArea;

    /**
     * 运输证有效起
     */
    @ApiModelProperty(value = "运输证有效起", required = true, example = "1511248354000")
    private Timestamp transDateStart;

    /**
     * 运输证有效止
     */
    @ApiModelProperty(value = "运输证有效止", required = true, example = "1511249854000")
    private Timestamp transDateStop;

    /**
     * 车辆初次登记日期
     */
    @ApiModelProperty(value = "车辆初次登记日期", required = true, example = "1511248354000")
    private Timestamp certifyDateB;

    /**
     * 检修状态：0=未检修，1=以检修，2=未知，字典：fixState
     */
    @ApiModelProperty(value = "检修状态：0=未检修，1=以检修，2=未知，字典：fixState", required = true, example = "1")
    private Integer fixState;

    /**
     * 下次年检时间
     */
    @ApiModelProperty(value = "下次年检时间", required = true, example = "1511248354000")
    private Timestamp nextFixDate;

    /**
     * 车辆年度审验状态，字典：checkState
     */
    @ApiModelProperty(value = "车辆年度审验状态，字典：checkState", required = true, example = "1")
    private String checkState;

    /**
     * 报备日期
     */
    @ApiModelProperty(value = "报备日期", required = true, example = "1511248354000")
    private Timestamp registerDate;

    /**
     * 服务类型，1=网络巡游出租车，2=巡游出租汽车，3=私人小客车合乘，字典：commercialType
     */
    @ApiModelProperty(value = "服务类型，1=网络巡游出租车，2=巡游出租汽车，3=私人小客车合乘，字典：commercialType", required = true, example = "1")
    private Integer commercialType;

    /**
     * 运价类型编码
     */
    @ApiModelProperty(value = "运价类型编码", required = true, example = "1")
    private Integer fareType;

    /**
     * gps品牌
     */
    @ApiModelProperty(value = "gps品牌", required = true, example = "凯立德")
    private String gpsBrand;

    /**
     * gps型号
     */
    @ApiModelProperty(value = "gps型号", required = true, example = "A1")
    private String gpsModel;

    /**
     * gpsImei
     */
    @ApiModelProperty(value = "gpsImei", required = true, example = "1234567890")
    private String gpsImei;

    /**
     * gps安装日期
     */
    @ApiModelProperty(value = "gps安装日期", required = true, example = "1511248354000")
    private Timestamp gpsInstallDate;

    /**
     * 打印设备id
     */
    @ApiModelProperty(value = "打印设备id", required = true, example = "123123213")
    private String feePrintId;

    /**
     * 总里程数
     */
    @ApiModelProperty(value = "总里程数", required = true, example = "28909")
    private Integer totalMileage;

    /**
     * 状态，0=启用，1=停用
     */
    @ApiModelProperty(value = "状态，0=启用，1=停用", required = true, example = "0")
    private Integer state;

    /**
     * 保险公司
     */
    @ApiModelProperty(value = "保险公司", required = true, example = "中国平安")
    @SelectLike
    private String insurCom;

    /**
     * 保险单号
     */
    @ApiModelProperty(value = "保险单号", required = true, example = "123124412")
    @SelectLike
    private String insurNum;

    /**
     * 保险类型
     */
    @ApiModelProperty(value = "保险类型", required = true, example = "交强险")
    private String insurType;

    /**
     * 保险金额
     */
    @ApiModelProperty(value = "保险金额", required = true, example = "5000")
    private Integer insurCount;

    /**
     * 保险生效日期
     */
    @ApiModelProperty(value = "保险生效日期", required = true, example = "1511248354000")
    private Timestamp insurEff;

    /**
     * 保险失效日期
     */
    @ApiModelProperty(value = "保险失效日期", required = true, example = "1511249354000")
    private Timestamp insurExp;

    /**
     * 备注
     */
    @ApiModelProperty(value = "备注", required = true, example = "备注一下")
    private String remark;

    /**
     * 来源，1=自营，2=加盟，字典：autoSource
     */
    @ApiModelProperty(value = "来源.字典：autoSource", readOnly = true, example = "自营")
    @Dict(type = "autoSource", fieldName = "source")
    @Transient
    private String sourceValue;

    /**
     * 车辆类型，字典：vehicleType
     */
    @ApiModelProperty(value = "车辆类型，字典：vehicleType", readOnly = true, example = "轿车")
    @Dict(type = "vehicleType", fieldName = "type")
    @Transient
    private String typeValue;

    /**
     * 服务类型，1=网络巡游出租车，2=巡游出租汽车，3=私人小客车合乘，字典：commercialType
     */
    @ApiModelProperty(value = "服务类型，1=网络巡游出租车，2=巡游出租汽车，3=私人小客车合乘，字典：commercialType", readOnly = true, example = "网络巡游出租车")
    @Dict(type = "commercialType", fieldName = "commercialType")
    @Transient
    private Integer commercialTypeValue;


    /**
     * 车辆年度审验状态，字典：checkState
     */
    @ApiModelProperty(value = "车辆年度审验状态，字典：checkState", readOnly = true, example = "年审合格")
    @Dict(type = "checkState", fieldName = "checkState")
    @Transient
    private String checkStateValue;

    /**
     * 运价类型编码
     */
    @ApiModelProperty(value = "运价类型编码", readOnly = true, example = "1")
    @Dict(type = "fareType", fieldName = "fareType")
    @Transient
    private Integer fareTypeValue;
    /**
     * 车身颜色，字典:vehicleColor
     */
    @ApiModelProperty(value = "车身颜色，字典:vehicleColor", readOnly = true, example = "白色")
    @Dict(type = "vehicleColor", fieldName = "vehicleColor")
    @Transient
    private String vehicleColorValue;

    /**
     * 车牌颜色，字典：plateColor
     */
    @ApiModelProperty(value = "车牌颜色，字典：plateColor", readOnly = true, example = "1")
    @Dict(type = "plateColor", fieldName = "plateColor")
    @Transient
    private String plateColorValue;

    /**
     * 用车类型,字典:vehiclePurpose
     */
    @ApiModelProperty(value = "用车类型,字典:vehiclePurpose", readOnly = true, example = "会务用车")
    @Dict(type = "vehiclePurpose", fieldName = "vehiclePurpose")
    @Transient
    private String vehiclePurposeValue;
    /**
     * 车品牌
     */
    @ApiModelProperty(value = "车品牌", readOnly = true, example = "宝马")
    @Transient
    private String autoBrand;


    /**
     * 车型
     */
    @ApiModelProperty(value = "车型", readOnly = true, example = "5系")
    @Transient
    private String autoModel;
}